import { http } from '@/utils/http'
import type { LoginItem } from '@/types/member'

export type LoginParam = {
  code: string
  encryptedData: string
  iv: string
}

/**
 * 小程序登录接口 针对企业用户
 *
 */
export const loginApi = (data: LoginParam) => {
  return http<LoginItem>({
    method: 'POST',
    url: '/login/wxMin',
    data,
  })
}


/**
 * 小程序登录接口 内测
 */
export const loginSimple = (phoneNumber: string) => {
  return http<LoginItem>({
    method: 'POST',
    url: '/login/wxMin/simple',
    data: {
      phoneNumber,
    },
  })
}
